package com.example.tijianserver.controller;

import com.example.tijianserver.pojo.Hospital;
import com.example.tijianserver.pojo.Users;
import com.example.tijianserver.response.ApiRestResponse;
import com.example.tijianserver.service.HospitalService;
import com.example.tijianserver.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/hospital")
public class HospitalController {

    @Autowired
    private HospitalService hospitalService;

    @RequestMapping("/listHospital")
    public ApiRestResponse<List<Hospital>> listHospital(Hospital hospital){
        return ApiRestResponse.success(hospitalService.listHospital(hospital));
    }

}
